/* $Header: tasks.h,v 2.2 01/10/02 10:30:44 przybyls Exp $ */

/***********************************************************************/
/* INCLUDE FILE NAME:                                                  */
/* ==================                                                  */
/*                                                                     */
/* Author: Tom Przybylski                                              */
/*                                                                     */
/* COMMENT: Include file for the NewtOS stuff for the IQ tasks that    */
/*   should be in the task_pub.h file but isn't (because we want to    */
/*   reuse that file as-is from Mark Brindle).                         */
/*                                                                     */
/*                                                                     */
/***********************************************************************/

#ifndef TASKS_H
#define TASKS_H

/* #include  <std_ops.h>  */

/*****************************/
/*   IFDEFS                  */
/*****************************/


/*****************************/
/*   SYMBOLIC CONSTANTS      */
/*****************************/


#define  N_ARGS           0     /* Default # arguments passed to    */
                                /* tasks at their startup           */

#define  ZONES_PRIORITY   1     /* Priority of Zone Task            */
#define  DISPLAY_PRIORITY 3     /* Priority of Display Monitor task */
#define  BG_PRIORITY      5     /* Priority of all Background tasks */


#define  DATA_AVAIL_SIG   0x0001 /* Signal mask for Data Available  */


#define  MAKESTR(a,b,c,d) (Unsigned32)((a<<24)+(b<<16)+(c<<8)+d)

/* WARNING!!!: When adding tasks, be sure to add pneu queues in p_ipc.c */
/*  (see Rick) Otherwise bus errors will occur when tasks try to use    */
/*  pneumatics ipc functions.                                           */

#define  ZONE_TASK_NAME   MAKESTR('Z','O','N','E')
#define  DISP_MON_NAME    MAKESTR('D','M','O','N')
#define  STAT_MON_NAME    MAKESTR('S','M','O','N')
#define  KBD_CMD_NAME     MAKESTR('K','C','M','D')
#define  MIO_CMD_NAME     MAKESTR('M','I','O','C')
#define  RS232_CMD_NAME   MAKESTR('R','2','3','2')
#define  CLOCK_TBL_NAME   MAKESTR('C','L','K','T')
#define  SEQUENCE_NAME    MAKESTR('S','E','Q','T')
#define  ALS_NAME         MAKESTR('A','L','S','T')
#define  INJ1_NAME        MAKESTR('I','N','J','1')
#define  INJ2_NAME        MAKESTR('I','N','J','2')
#define  TRAY_NAME        MAKESTR('T','R','A','Y')
#define  SIG_BUFFER_NAME  MAKESTR('S','B','U','F')
#define  GAS_PASS_NAME    MAKESTR('G','A','S','P')
/*--------begin change by wangwei----------*/
#define  RUN_TASK_NAME    MAKESTR('R','U','N','T')
#define  TUI_TASK_NAME    MAKESTR('T','U','I','T')
#define  UART_TASK_NAME    MAKESTR('U','A','R','T')
#define  TCP_TASK_NAME    MAKESTR('T','C','P','T')
/*--------end change----------------------*/

/*****************************/
/*   MACROS                  */
/*****************************/


/*****************************/
/*   TYPEDEFS                */
/*****************************/


/*****************************/
/*   EXTERNALS               */
/*****************************/

extern  TaskID  Zone_Task_ID;
extern  TaskID  Display_Monitor_ID;
extern  TaskID  Status_Monitor_ID;
extern  TaskID  Keyboard_Cmd_Task_ID;
extern  TaskID  MIO_Cmd_Task_ID;
extern  TaskID  Clock_Table_Task_ID;
extern  TaskID  Sequence_Task_ID;
extern  TaskID  Als_Task_ID;
extern  TaskID  Inj1_Task_ID;
extern  TaskID  Inj2_Task_ID;
extern  TaskID  Tray_Task_ID;
extern  TaskID  Signal_Buffer_Task_ID;
extern  TaskID  Gas_Pass_Task_ID;
/*--------begin change by wangwei----------*/
extern  TaskID  Run_Task_ID;
extern  TaskID  RS232_Cmd_Task_ID;
extern  TaskID  TUI_Task_ID;
extern  TaskID  UART_Task_ID;
/*--------end change----------------------*/

#endif
